<template>
	<view class="content">
		<view class="header">
			<view class="box">
				<text class="iconfont icon-left" @click="go()"></text>
				<text class="title">客户信息</text>
			</view>
		</view>
		<view class="list">
			<view class="item">
				<text>客户类型</text>
				<text class="ff">{{user_info.levelInfo.name}}</text>
			</view>
		</view>
		<view class="list">
			<view class="item">
				<text>用户名</text>
				<view>
					<text class="ff">{{user_info.username}}</text>
				</view>
			</view>
			<view class="item">
				<text>姓名</text>
				<view>
					<text class="ff">{{user_info.real_name}}</text>
				</view>
			</view>
			<view class="item">
				<text>性别</text>
				<view>
					<text class="ff">{{user_info.sex}}</text>
				</view>
			</view>
			<view class="item">
				<text>出生日期</text>
				<view>
					<text class="ff">{{user_info.birthday}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user_info:{}
			}
		},
		onLoad() {
			this.getData();
		},
		methods: {
			go(){
				uni.navigateBack({
					delta:1
				})
			},
			getData(){
				let self = this;
				uni.getStorage({
					key:'user_info',
					success:function(res){
						self.user_info = res.data;
						console.log(res.data);
					},
					fail:function(){
						uni.navigateTo({
							url : '/pages/login/login',
						});
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	view,
	text,
	input,
	textarea {
		box-sizing: border-box;
	}

	page {
		background: #F1F1F1;
	}

	.list {
		overflow: hidden;
		margin-bottom: 25rpx;
		background: #fff;
		padding-left: 30rpx;

		.item {
			overflow: hidden;
			width: 100%;
			height: 90rpx;
			padding-right: 20rpx;
			border-bottom: 1px solid #EDEDED;
			display: flex;
			align-items: center;
			justify-content: space-between;
			view{
				display: flex;
				align-items: center;
				overflow: hidden;
			}
			& > text {
				font-size: 26rpx;
				color: #2D2D2D;
			}

			.right {
				width: 17rpx;
				height: 29rpx;
			}
			.iconfont{
				color: #DADADA;
				font-size: 30rpx;
				margin-left: 20rpx;
			}
			.icos{
				width: 70rpx;
				height: 70rpx;
				border-radius: 50%;
				display: block;
			}

			.ff {
				font-size: 24rpx;
				color: #7A7A7A;
			}
		}
	}

	.content {
		overflow: hidden;
		width: 100%;
		position: relative;

		.header {
			overflow: hidden;
			width: 100%;
			background-image: url(../../static/fawu_06.jpg);
			background-size: 100% 33rpx;
			background-repeat: no-repeat;
			background-position: bottom center;
			height: 155rpx;
			background-color: #153B33;
			position: relative;
			padding: 60rpx 0 0 0;

			.box {
				overflow: hidden;
				width: 100%;
				display: flex;
				position: relative;
				align-items: center;
				justify-content: center;

				.title {
					font-size: 28rpx;
					color: #DBAC53;
				}
				.icon-shezhi{
					position: absolute;
					right: 17rpx;
					top: 50%;
					font-size: 30rpx;
					transform: translateY(-50%);
				}
				.icon-left{
					color: #DBAC53;
					position: absolute;
					left: 17rpx;
					font-size: 35rpx;
					top: 50%;
					transform: translateY(-50%);
				}
			}
		}
	}
</style>
